# flake8: noqa: E402
# pylint: disable=wrong-import-position
import os
from server import PromptServer

BASE_DIR = os.path.dirname(os.path.abspath(__file__))
EXTENSION_NAME = os.path.basename(BASE_DIR)
MESSAGE_ROUTE = "/dadosNodes"

class Constants:
    @property
    def BASE_DIR(self):
        return BASE_DIR

constants = Constants()

WEB_DIRECTORY = "./web/comfyui"
COMMON_DIRECTORY = "./web/common"


#from .nodes.inactive_pinterest_image import inactivePinterestImageNode
from .nodes.DN_MultilineString import DN_MultilineString
from .nodes.DN_TextConcatenateNode import DN_TextConcatenateNode
from .nodes.DN_TextDropDownNode import DN_TextDropDownNode
from .nodes.DN_CSVMultiDropDownNode import DN_CSVMultiDropDownNode
from .nodes.DN_WildcardPromptEditorNode import DN_WildcardPromptEditorNode
from .nodes.DN_WildcardSelectorComposerV2 import DN_WildcardSelectorComposerV2
from .nodes.DN_PromptSectionsExtractor import DN_PromptSectionsExtractor
from .nodes.DN_WildcardsProcessor import DN_WildcardsProcessor
from .nodes.DN_SmolVLMNode import DN_SmolVLMNode
# from .nodes.pinterest_fetch import PinterestFetch
from .nodes.DN_JoyTaggerNode import DN_JoyTaggerNode
from .nodes.DN_PixAITaggerNode import DN_PixAITaggerNode
from .nodes.DN_TagOpsNode import DN_TagOpsNode
from .nodes.DN_pyPinNode import DN_pyPinNode

from .nodes.utils.api_routes import register_routes

NODE_CLASS_MAPPINGS = {
    #"inactivePinterestImageNode": inactivePinterestImageNode,
    "DN_MultilineString": DN_MultilineString,
    "DN_TextConcatenateNode": DN_TextConcatenateNode,
    "DN_TextDropDownNode": DN_TextDropDownNode,
    "DN_CSVMultiDropDownNode": DN_CSVMultiDropDownNode,
    "DN_WildcardPromptEditorNode": DN_WildcardPromptEditorNode,
    "DN_WildcardSelectorComposerV2": DN_WildcardSelectorComposerV2,
    "DN_PromptSectionsExtractor": DN_PromptSectionsExtractor,
    "DN_WildcardsProcessor": DN_WildcardsProcessor,
    "DN_SmolVLMNode": DN_SmolVLMNode,
    # "PinterestFetch": PinterestFetch,
    "DN_JoyTaggerNode": DN_JoyTaggerNode,
    "DN_PixAITaggerNode": DN_PixAITaggerNode,
    "DN_TagOpsNode": DN_TagOpsNode,
    "DN_pyPinNode": DN_pyPinNode,
}

NODE_DISPLAY_NAME_MAPPINGS = {
    #"inactivePinterestImageNode": "Pinterest Node (WIP - broken)",
    "DN_MultilineString": "Multiline String",
    "DN_TextConcatenateNode": "Dynamic Text Concatenate",
    "DN_TextDropDownNode": "Text DropDown",
    "DN_CSVMultiDropDownNode": "CSV MultiDropDown",
    "DN_WildcardPromptEditorNode": "Wildcard Prompt Editor (deprecation pending)",
    "DN_WildcardSelectorComposerV2": "Wildcard Selector/Composer",
    "DN_PromptSectionsExtractor": "Prompt Sections Extractor",
    "DN_WildcardsProcessor": "Wildcards Processor",
    "DN_SmolVLMNode": "SmolVLM Image Describer",
    # "PinterestNode": "Pinterest Node",
    "DN_JoyTaggerNode": "JoyTagger",
    "DN_PixAITaggerNode": "PixAI Tagger",
    "DN_TagOpsNode": "TagOps",
    "DN_pyPinNode": "PyPin Node",
}

register_routes()

__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
